package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.DeviceDataPageReqDto;
import com.zzyl.service.DeviceDataService;
import com.zzyl.vo.DeviceDataVo;
import com.zzyl.vo.DeviceVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/device-data")
@Api(tags = "设备数据管理 - 物联网")
public class DeviceDataController {

    @Autowired
    DeviceDataService deviceDataService;


    @RequestMapping("/get-page")
    @ApiOperation(value = "获取设备数据分页结果")
    public ResponseResult<PageResponse<DeviceDataVo>> pageQueryDevice(DeviceDataPageReqDto deviceDataPageReqDto) {
        PageResponse<DeviceDataVo> pageResponse = deviceDataService.pageQueryDevice(deviceDataPageReqDto);
        return ResponseResult.success(pageResponse);
    }


}
